Repository navigation
[Windows] Fix Modal page has a 32px title bar gap at the top in full-screen mode - #36209
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36209Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36209" |
There was a problem hiding this comment.
Pull request overview
Fixes Windows full-screen modal presentation issues where a modal page incorrectly reserves title-bar space (creating a ~32px visual gap and an unclickable region) by adjusting title bar visibility handling for modal navigation roots and adding targeted Windows device tests.
Changes:
- Suppress modal
NavigationRootManagertitle-bar reservation when the host window is inAppWindowPresenterKind.FullScreen. - Subscribe to presenter changes so entering/exiting full-screen while a modal is visible updates the top modal’s title-bar state.
- Add Windows device tests to validate full-screen (no reservation) and windowed (reservation preserved) modal behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs | Updates modal push/pop behavior and tracks presenter changes to toggle title-bar reservation in full-screen. |
| src/Controls/tests/DeviceTests/Elements/Modal/ModalTests.Windows.cs | Adds Windows device tests covering full-screen and windowed modal title-bar reservation behavior. |
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 2 findings
See inline comments for details.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 1 findings
See inline comments for details.
| // mode there are no OS window controls to avoid, so suppress this reservation. | ||
| // This also clears the InputNonClientPointerSource passthrough regions, fixing | ||
| // the unclickable top area that would otherwise remain in full-screen mode. | ||
| if (IsWindowFullScreen()) |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[major] Logic and Correctness — The initial modal push only clears the modal title-bar reservation in full-screen mode. If an app has Window.TitleBar = new TitleBar { IsVisible = false } and pushes a modal while windowed, the modal NavigationRootManager constructor still reserves the 32px title-bar area; SetTitleBar(titlebar, modalContext) does not apply the initial IsVisible=false, and the later pop/presenter-change paths already treat hidden title bars as showTitleBar=false. Please use the same visibility predicate here and cover that initial-push case.
Two PRs showed an unclear gate outcome: - #36109 (iOS): the gate exited without a report and the fallback showed only the alarming, generic 'verify-tests-fail.ps1 exited before writing a verification report. Exit code: 3' with no root cause or next step. - #36209 (Windows): the report had bare '⚠️ ENV ERROR' cells ('result XML empty or not valid — app likely crashed') but no classification explaining it was infrastructure, not a test/PR failure. Fixes: 1. Review-PR.ps1 no-report fallback is now exit-code/log aware: distinct, honest lead-ins for simulator-boot failure, app-crash/empty-result-file, app-launch failure, and exit-code-3 INCONCLUSIVE — each says it is transient infra, not the PR, and to comment /review to retry. 2. verify-tests-fail.ps1 full A/B report: add a classification branch for the env-error INCONCLUSIVE case (previously skipped by the -not $hasEnvError guard, leaving no explanation) that states the cause and next step. Also drops the stale '/review rerun' phrasing (functionality removed) in favour of '/review'. Parse-checked both scripts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 15d2af20-e4ab-4e88-9011-cfbd83513bc0
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 1 findings
See inline comments for details.
| // mode there are no OS window controls to avoid, so suppress this reservation. | ||
| // This also clears the InputNonClientPointerSource passthrough regions, fixing | ||
| // the unclickable top area that would otherwise remain in full-screen mode. | ||
| if (IsWindowFullScreen()) |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[major] Windows modal/title-bar handling — This initial push path only suppresses the modal title-bar reservation for full-screen windows, but the pop and presenter-change paths also honor Window.TitleBar.IsVisible. In a windowed app that sets Window.TitleBar = new TitleBar { IsVisible = false } before pushing a modal, the new modal NavigationRootManager keeps the constructor default 32px reservation because this condition is false and no later call clears it. Please compute the same showTitleBar = !IsWindowFullScreen() && ((_window.TitleBar as TitleBar)?.IsVisible ?? true) value here and call windowManager.SetTitleBarVisibility(showTitleBar) before wiring the modal title bar.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs:44
- The comment mentions “activity recreation on Windows”, but Windows doesn’t have an Activity lifecycle; this is describing WinUI window/handler recreation. Updating the wording would avoid confusion and make the intent clearer.
// When the WinUI window handler is recreated (e.g., activity recreation on Windows),
// the AppWindow instance may change. Clear the subscription to the old AppWindow so
// that SubscribeToPresenterChanges() can attach to the new one when the modal stack
// is resynced after the handler is reconnected.
src/Controls/tests/DeviceTests/Elements/Modal/ModalTests.Windows.cs:320
- This assertion compares against
AppTitleBarContainer?.Visibility, butAppTitleBarContainercan be null until the template is applied; that would make the test fail for reasons unrelated to the behavior under test. UseWindowTitleBarContentControlMinHeight > 0(the reserved title bar height) as the signal instead.
// In windowed mode, the modal's title bar container must remain visible.
// The fix must not affect this path.
Assert.Equal(
UI.Xaml.Visibility.Visible,
modalWindowRootView.AppTitleBarContainer?.Visibility);
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@devanathan-vaithiyanathan — new AI review results are available based on this last commit:
a902458.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ⚠️ INCONCLUSIVE
Platform: WINDOWS · Base: main · Merge base: faa6d916
🩺 Could not verify — environment/infrastructure error. The gate ran the tests but hit an environment error (the test app crashed or exited before writing its results, an emulator/simulator/Appium/XHarness flake, or an empty/invalid result file), so it could not record a real pass/fail. The /review to retry on a fresh agent.
Windows device test result file 'artifacts\log\TestResults-Microsoft_Maui_Controls_DeviceTests_Modal.xml' is empty or not valid XML (the device-test app likely crashed or exited before writing results).
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
📱 ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible) Category=Modal |
🔴 Without fix — 📱 ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible): ⚠️ ENV ERROR · 357s
No log file found
🟢 With fix — 📱 ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible): ⚠️ ENV ERROR · 188s
No log file found
⚠️ Failure Details
⚠️ ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible) without fix:Windows device test result file 'artifacts\log\TestResults-Microsoft_Maui_Controls_DeviceTests_Modal.xml' is empty or not valid XML (the device-test app likely crashed or exited before writing results).⚠️ ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible) with fix:Windows device test result file 'artifacts\log\TestResults-Microsoft_Maui_Controls_DeviceTests_Modal.xml' is empty or not valid XML (the device-test app likely crashed or exited before writing results).
📁 Fix files reverted (1 files)
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs
📱 UI Tests — Navigation
Detected UI test categories: Navigation
✅ Deep UI tests — 80 passed, 0 failed across 1 category on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
Navigation |
80/82 ✓ | — |
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs) |
📋 Pre-Flight — Context & Validation
Issue: #36040 - Windows modal pages leave title-bar space / hit-test gap in full-screen mode
PR: #36209 - Fix Windows modal title-bar reservation in full-screen mode
Platforms Affected: Windows
Files Changed: 1 implementation, 1 test
Key Findings
- Local diff changes
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.csandsrc/Controls/tests/DeviceTests/Elements/Modal/ModalTests.Windows.cs. - PR approach fixes the modal-specific symptom in
ModalNavigationManager: suppress reservation on modal push/pop, subscribe toAppWindow.Changedfor presenter changes, and add Windows Controls device tests. - GitHub CLI is unauthenticated and public REST/web access is rate-limited/blocked, so pre-flight issue/PR narrative is reconstructed from local diff and prior code-review output.
- Impacted test area: Controls DeviceTests, Modal/Navigation on Windows.
Code Review Summary
Verdict: NEEDS_DISCUSSION
Confidence: low
Errors: 0 | Warnings: 1 | Suggestions: 1
Key code review findings:
- ⚠ Hidden
TitleBar.IsVisible=falsebehavior lacks direct regression coverage inModalTests.Windows.cs. - ℹ Deduplicate the repeated title-bar visibility predicate in
ModalNavigationManager.Windows.cs.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #36209 | Modal manager suppresses modal title-bar reservation in full-screen/hidden-titlebar states and updates on AppWindow.Changed. |
ModalNavigationManager.Windows.cs, ModalTests.Windows.cs |
Original PR; gate was already inconclusive and was not rerun. |
🔬 Code Review — Deep Analysis
Code Review — PR #36209
Independent Assessment
What this changes: Windows modal navigation suppresses a modal NavigationRootManager title-bar reservation when the host window is full-screen or the MAUI TitleBar is hidden, and subscribes to AppWindow.Changed while modals are visible to update that reservation on presenter changes.
Inferred motivation: Modal pages were leaving a 32px title-bar gap / non-client hit-test region at the top in Windows full-screen mode.
Reconciliation with PR Narrative
Author claims: Fixes #36040 by clearing modal title-bar space in full-screen and handling runtime presenter changes.
Agreement/disagreement: Matches the code. The implementation also covers hidden Window.TitleBar.IsVisible == false.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
AppWindow.Changed UI updates off UI thread |
MauiBot [critical] |
✅ Fixed | Uses captured DispatcherQueue and dispatches before modal/WinUI state access. |
Handler recreation leaves old AppWindow.Changed subscription |
MauiBot [major] |
✅ Fixed | HandlerChanging unsubscribes when OldHandler exists. |
| Popping last modal in full-screen leaves root title-bar visuals collapsed | MauiBot [major] |
✅ Fixed | Pop path keeps root visual containers visible and only adjusts reservation height. |
Hidden MAUI TitleBar not preserved on pop/presenter change |
MauiBot [major] |
✅ Fixed | Predicate includes TitleBar.IsVisible. |
Initial modal push ignores hidden TitleBar |
MauiBot [major] |
✅ Fixed | Push path uses same predicate. |
Blast Radius Assessment
- Runs for all instances: No — active behavior applies to Windows modal push/pop and presenter changes while a modal is visible.
- Startup impact: Low — event handlers register during manager initialization, but title-bar mutation happens only during modal/presenter events.
- Static/shared state: No static state; instance event subscription is cleaned up on last modal pop, destroying, and handler changing.
CI Status
- Required-check result: tool-unavailable/undetermined because GitHub CLI is unauthenticated in this environment.
- Classification: undetermined for required checks.
- Action taken: capped confidence at low and did not use LGTM.
Findings
⚠️ Warning — Hidden TitleBar.IsVisible=false behavior lacks direct regression coverage
The production code combines full-screen state with ((_window.TitleBar as TitleBar)?.IsVisible ?? true) on push, pop, and presenter-change paths. The new tests exercise full-screen/default-titlebar behavior but not a windowed app with window.TitleBar = new TitleBar { IsVisible = false }.
💡 Suggestion — Deduplicate the title-bar visibility predicate
The same title-bar visibility rule appears in three places. Extracting a helper would reduce future drift, especially because prior review findings depended on all paths agreeing.
Failure-Mode Probing
- Full-screen before modal push:
showTitleBarOnPushbecomes false and clears the modal reservation. - Presenter changes while modal is visible: subscribed on first modal push, dispatched to UI thread, rechecks modal count, updates top modal.
- Last modal popped while still full-screen: root containers remain visible while reservation height is set to 0.
- Handler recreation:
HandlerChangingunsubscribes from the oldAppWindow; shared manager clears platform modal pages.
Verdict: NEEDS_DISCUSSION
Confidence: low
Summary: Code issues previously flagged as critical/major appear addressed, and no new blocking correctness bug was found. Required-check status could not be verified through authenticated gh; remaining concern is a hidden-titlebar test coverage gap.
📝 Recommended PR Title & Description
Assessment: ✏️ Recommend updating — the current description is accurate but has two fix-description issues: it says "and also handled the runtime presented changes" instead of "presenter changes", and the Before/After table labels the Windows after screenshot as Mac.
Recommended title
[Windows] ModalNavigation: Fix full-screen title-bar gap
Recommended description
### Issue Details
Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath (title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks
### Root Cause
NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar, so this reservation is wrong for modal pages.
### Description of Change
In ModalNavigationManager.Windows.cs, when pushing a modal, check whether the presenter is FullScreen or the app's TitleBar is hidden and call windowManager.SetTitleBarVisibility(false) so the modal does not reserve title-bar height or leave a non-client hit-test gap.
The fix also subscribes to AppWindow.Changed while a modal is visible so runtime presenter changes update the top modal's title-bar reservation, and unsubscribes when the modal stack is cleared, the window is destroyed, or the window handler changes.
Windows device tests were added for:
* Pushing a modal while already in full-screen mode
* Keeping windowed modal title-bar behavior unchanged
* Updating the modal title-bar reservation when the presenter changes while the modal is visible
### Issues Fixed
Fixes #36040
**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac
| Before | After |
|---------|--------|
| **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Windows**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
🏁 Report — Final Recommendation
Comparative Candidate Report — PR #36209
Available candidates
| Candidate | Source | Regression status | Assessment | Rank |
|---|---|---|---|---|
pr |
Submitted PR fix | Correctly fixes the Windows full-screen modal title-bar reservation and hit-test gap, handles runtime presenter changes, and includes targeted Windows device tests. No expert inline findings. | 1 | |
pr-plus-reviewer |
PR fix plus expert-reviewer polish | Adds only non-blocking improvements: hidden-titlebar regression coverage and/or predicate deduplication. Useful polish, but not a materially safer fix than the submitted PR because no blocking issue was found. | 2 |
No try-fix summary or try-fix-N/content.md artifacts were present under CustomAgentLogsTmp/PRState/36209/PRAgent, so there are no STEP 5a try-fix candidates available to compare. No candidate is recorded as having failed regression tests; the gate result is explicitly inconclusive because of an environment/test-result XML error and is not treated as a failing fix.
Winning candidate
Winner: pr
The raw PR fix wins because it directly addresses the reported Windows full-screen modal bug while preserving modal navigation lifecycle safety. The expert reviewer found no actionable inline defects, and the only reviewer feedback is optional coverage/refactoring polish that does not justify replacing the submitted fix.
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
…screen mode (#36209) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen: * A 32px strip at the top of the modal page shows the page underneath (title bar height gap) * The top ~32px of the modal page does not respond to mouse clicks ### Root Cause NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages. ### Description of Change <!-- Enter description of the fix in this section --> In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36040 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> **Tested the behavior in the following platforms.** - [ ] Android - [x] Windows - [ ] iOS - [ ] Mac | Before | After | |---------|--------| | **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Mac**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details
Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen:
Root Cause
NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages.
Description of Change
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes.
Issues Fixed
Fixes #36040
Tested the behavior in the following platforms.